import 'package:flutter/material.dart';
import 'package:flutterzhuyili/model/theme.dart';
import 'package:flutterzhuyili/page/infomation.dart';
import 'package:flutterzhuyili/page/router.dart';
import 'package:flutterzhuyili/utils/textMessage.dart';
import 'package:line_icons/line_icons.dart';
import 'package:provider/provider.dart';

class Me extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text(
            '更多',
          ),
        ),
        body: Container(
          child: Stack(
            children: <Widget>[
              buildListView(context),
            ],
          ),
        ));
  }

  ListView buildListView(BuildContext context) {
    return ListView(
      children: <Widget>[
        ListTile(
            leading: Container(
                height: 25,
                width: 25,
                child: Icon(
                  LineIcons.bookmark,
                )),
            title: new Text('隐私政策', style: TextStyle()),
            onTap: () {
              Navigator.pushNamed(context, RouterInfomationPage,
                  arguments: {'title': '隐私政策', 'message': ys});
            }),
        ListTile(
            leading: Container(
                height: 25,
                width: 25,
                child: Icon(
                  LineIcons.bookmark_o,
                )),
            title: new Text('用户协议', style: TextStyle()),
            onTap: () {
              Navigator.pushNamed(context, RouterInfomationPage,
                  arguments: {'title': '用户协议', 'message': xy});
            }),
        ListTile(
            leading: Icon(Icons.remove_red_eye),
            title: new Text('视觉模式切换'),
            onTap: () {
              Provider.of<CustomTheme>(context).changeTheme();
            }),
      ],
    );
  }
}
